home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
progjour
/
1989
/
03a
/
esql.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-04-19
|
934b
|
35 lines
{* LISTING 5 -- SAMPLE PASCAL Embedded SQL syntax *}
{variable declarations}
exec sql
begin declare section;
var in_product_rec : record;
in_product_id : fstring (3);
in_product_price : int32;
in_product_name : fstring (20);
end;
exec sql
end declare section;
{additional Pascal code here}
. . .
begin
in_product_rec.in_product_id := 12;
in_product_rec.in_product_price := 3000;
in_product_rec.in_product_name := "PANTS";
exec sql insert into product
(id , price, name )
values
(:in_product_rec.in_product_id,
:in_product_rec.in_product_price,
:in_product_rec.in_product_name);
end.